import { _decorator, Component, Node, Label } from 'cc';
const { ccclass, property } = _decorator;

@ccclass('scoreMgr')
export class scoreMgr extends Component {
    
    
    score: number = 0;

    // 设置分数
    setScore(score: number) {
        this.score = score
        this.getComponent(Label).string = this.score + ''
    }

    addScore(score: number) {
        this.score += score
        this.getComponent(Label).string = this.score + ''
    }

}


